package com.edu.internship.busi.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

import java.util.Objects;
import java.util.Set;

@Data
@ApiModel
@Accessors(chain = true)
@TableName("t_permission")
@AllArgsConstructor
@NoArgsConstructor

public class Permission {

    private static final long serialVersionUID = 1L;
    @ApiModelProperty("主键")
    private String id;
    @ApiModelProperty("路径")
    private String path;
    @ApiModelProperty("路径名")
    private String name;
    @ApiModelProperty("状态")
    private String status;
    @ApiModelProperty("备注")
    private String component;

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        Permission that = (Permission) o;
        return path.equals(that.path);
    }

    @Override
    public int hashCode() {
        return Objects.hash(path);
    }
}
